package me.zhengjie.modules.management.mapper;

import me.zhengjie.modules.management.domain.ConferenceRecord;
import me.zhengjie.modules.management.domain.MrRecordDtl;
import me.zhengjie.modules.management.service.dto.MrRecordDtlDto;
import me.zhengjie.modules.management.service.dto.RoomCostCriteria;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.List;

/**
 * @program: eladmin
 * @description: 培训明细数据访问层
 * @author: ming.cao
 * @create: 2020-12-14 18:51
 **/
@Mapper
public interface MrRecordDtlMapper {
    /**
     * @title: getListById
     * @description: 获取所有数据
     * @date: 2020/12/14 18:55
     * @author: ming.cao
     * @param
     * @return java.util.List<me.zhengjie.modules.management.domain.MrRecordDtl>
     * @throws
     */
    List<MrRecordDtlDto> getListById(Integer recordId);

    /**
     * @title: addMrRecordDtl
     * @description: 新增明细数据
     * @date: 2020/12/14 18:55
     * @author: ming.cao
     * @param dtl
     * @return void
     * @throws
     */
    void addMrRecordDtl(MrRecordDtl dtl);

    /**
     * @title: delMrRecordDtl
     * @description: 删除明细数据
     * @date: 2020/12/14 18:56
     * @author: ming.cao
     * @param id
     * @return void
     * @throws
     */
    void delMrRecordDtl(Integer id);

    /**
     * @title: updateMrRecordDtl
     * @description: 更新明细数据
     * @date: 2020/12/14 18:56
     * @author: ming.cao
     * @param dtl
     * @return void
     * @throws
     */
    void updateMrRecordDtl(MrRecordDtl dtl);

    /**
     * @title: checkDtlIsExists
     * @description: 检查是否存在
     * @date: 2020/12/15 10:11
     * @author: ming.cao
     * @param dtl
     * @return java.lang.Integer
     * @throws
     */
    Integer checkDtlIsExists(MrRecordDtl dtl);

    /**
     * @title: getMaterialCost
     * @description: 获取材料收费
     * @date: 2020/12/15 16:07
     * @author: ming.cao
     * @param recordId
     * @return java.math.BigDecimal
     * @throws
     */
    BigDecimal getMaterialCost(Integer recordId);

    /**
     * @title: getRoomCost
     * @description: 获取教室收费（数据库的）
     * @date: 2020/12/15 16:07
     * @author: ming.cao
     * @param recordId
     * @return java.math.BigDecimal
     * @throws
     */
    BigDecimal getRoomCost(Integer recordId);

    /**
     * @title: getCurrentRoomCost
     * @description: 获取会议结算时间的费用
     * @date: 2020/12/21 15:02
     * @author: ming.cao
     * @param criteria
     * @return java.math.BigDecimal
     * @throws
     */
    BigDecimal getCurrentRoomCost(RoomCostCriteria criteria);


    /**
     * @title: updateRecordDate
     * @description: 更新时间
     * @date: 2020/12/15 16:49
     * @author: ming.cao
     * @param record
     * @return void
     * @throws
     */
    void updateRecordDate(ConferenceRecord record);

    /**
     * @title: updateRecord
     * @description: 更新会议信息
     * @date: 2020/12/16 8:13
     * @author: ming.cao
     * @param record
     * @return void
     * @throws
     */
    void updateRecord(ConferenceRecord record);

    /**
     * 根据物资id查询种类
     * @param materialId
     * @return
     */
    MrRecordDtlDto findTypeId(Integer materialId);
}
